package com.duowei.diandan.bean;

import com.duowei.diandan.sql.ColumnName;
import com.duowei.diandan.sql.InsertField;
import com.duowei.diandan.sql.TableName;

import org.joda.time.LocalDateTime;

/**
 * 会员积分交易记录
 */
@TableName(name = "ims_card_jf_record")
public class ImsCardJfRecord {
    // id int(10) unsigned PRIMARY KEY NOT NULL AUTO_INCREMENT,

    @InsertField
    private Integer weid; // int(10) NOT NULL,
    @InsertField
    @ColumnName(name = "from_user")
    private String fromUser; // varchar(50) NOT NULL,
    @InsertField
    private LocalDateTime jysj; // datetime COMMENT '交易时间',
    @InsertField
    private String jylx; // varchar(20) COMMENT '交易类型',
    @InsertField
    private Float czqjf; // decimal(10,2) COMMENT '操作前积分',
    @InsertField
    private Float kczjf; // decimal(10,2) COMMENT '操作积分',
    @InsertField
    private Float ssje; // decimal(10,2),
    @InsertField
    private Float syjf; // decimal(10,2) COMMENT '剩余积分',
    @InsertField
    private String syjh; // varchar(200) COMMENT '收银机号',
    @InsertField
    private String yhmc; // varchar(50) COMMENT '操作人',
    @InsertField
    private String fkfs; // varchar(50),
    @InsertField
    @ColumnName(name = "deal_id")
    private String dealId; // varchar(50),
    @InsertField
    private String bmbh; // varchar(10),
    @InsertField
    private String ddh; // varchar(100),
    @InsertField
    private String ddid; // varchar(100),
    @InsertField
    private String storeid; // varchar(100),
    @InsertField
    private String username; // varchar(200),
    @InsertField
    private Float yzdjf; // decimal(10,2) DEFAULT '0.00' COMMENT '已指定积分',
    @InsertField
    private String oldcardsn; // varchar(20),
    @InsertField
    private String clzt; // varchar(2) DEFAULT '0',
    @InsertField
    private Integer uid; // int(10) DEFAULT '0'

    public ImsCardJfRecord() {
    }

    public Integer getWeid() {
        return weid;
    }

    public void setWeid(Integer weid) {
        this.weid = weid;
    }

    public String getFromUser() {
        return fromUser;
    }

    public void setFromUser(String fromUser) {
        this.fromUser = fromUser;
    }

    public LocalDateTime getJysj() {
        return jysj;
    }

    public void setJysj(LocalDateTime jysj) {
        this.jysj = jysj;
    }

    public String getJylx() {
        return jylx;
    }

    public void setJylx(String jylx) {
        this.jylx = jylx;
    }

    public Float getCzqjf() {
        return czqjf;
    }

    public void setCzqjf(Float czqjf) {
        this.czqjf = czqjf;
    }

    public Float getKczjf() {
        return kczjf;
    }

    public void setKczjf(Float kczjf) {
        this.kczjf = kczjf;
    }

    public Float getSsje() {
        return ssje;
    }

    public void setSsje(Float ssje) {
        this.ssje = ssje;
    }

    public Float getSyjf() {
        return syjf;
    }

    public void setSyjf(Float syjf) {
        this.syjf = syjf;
    }

    public String getSyjh() {
        return syjh;
    }

    public void setSyjh(String syjh) {
        this.syjh = syjh;
    }

    public String getYhmc() {
        return yhmc;
    }

    public void setYhmc(String yhmc) {
        this.yhmc = yhmc;
    }

    public String getFkfs() {
        return fkfs;
    }

    public void setFkfs(String fkfs) {
        this.fkfs = fkfs;
    }

    public String getDealId() {
        return dealId;
    }

    public void setDealId(String dealId) {
        this.dealId = dealId;
    }

    public String getBmbh() {
        return bmbh;
    }

    public void setBmbh(String bmbh) {
        this.bmbh = bmbh;
    }

    public String getDdh() {
        return ddh;
    }

    public void setDdh(String ddh) {
        this.ddh = ddh;
    }

    public String getDdid() {
        return ddid;
    }

    public void setDdid(String ddid) {
        this.ddid = ddid;
    }

    public String getStoreid() {
        return storeid;
    }

    public void setStoreid(String storeid) {
        this.storeid = storeid;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public Float getYzdjf() {
        return yzdjf;
    }

    public void setYzdjf(Float yzdjf) {
        this.yzdjf = yzdjf;
    }

    public String getOldcardsn() {
        return oldcardsn;
    }

    public void setOldcardsn(String oldcardsn) {
        this.oldcardsn = oldcardsn;
    }

    public String getClzt() {
        return clzt;
    }

    public void setClzt(String clzt) {
        this.clzt = clzt;
    }

    public Integer getUid() {
        return uid;
    }

    public void setUid(Integer uid) {
        this.uid = uid;
    }

    /**
     * @param weid
     * @param fromUser
     * @param jylx     交易类型（积分消费、获取积分）
     * @param jysj     交易时间
     * @param czqjf    操作前积分
     * @param kczjf    操作积分 （正负）
     * @param syjf     剩余积分
     * @param syjh     收银机号
     * @param yhmc     操作人
     * @param dealId   交易记录id
     * @param bmbh     交易记录门店，关联ims_idish_stores的bmbh
     * @param uid      Uid会员唯一标示对应ims_fans中的ID
     *//*
    public ImsCardJfRecord(int weid, String fromUser, String jysj, String jylx, float czqjf, float kczjf,
                           float syjf, String syjh, String yhmc, String dealId, String bmbh, int uid) {
        this.weid = weid;
        this.fromUser = fromUser;
        this.jysj = jysj;
        this.jylx = jylx;
        this.czqjf = czqjf;
        this.kczjf = kczjf;
        this.syjf = syjf;
        this.syjh = syjh;
        this.yhmc = yhmc;
        this.dealId = dealId;
        this.bmbh = bmbh;
        this.uid = uid;
    }

    *//**
     * 产生插入sql
     * 例子：
     * INSERT INTO we7.ims_card_jf_record (weid, from_user, jysj, jylx, czqjf, kczjf, ssje, syjf, syjh, yhmc, fkfs, deal_id, bmbh, ddh, ddid, storeid, username, yzdjf, oldcardsn, clzt, uid)
     * VALUES (26, 'ootzjszEH7DKpDjdIk6dUOfo_ur8', '2015-03-24 18:03:13', '获取积分', 0.00, 4.00, null, 4.00, 'WQQPOS', '管理员', null, '45893', '037', null, null, null, null, 4.00, null, '0', null);
     *//*
    public String toInsertString() {
        return "INSERT INTO ims_card_jf_record (weid,          from_user,          jysj,           jylx,          czqjf,         kczjf,     ssje,     syjf,          syjh,           yhmc,      fkfs,      deal_id,          bmbh,      ddh, ddid,  storeid, username, yzdjf, oldcardsn, clzt,     uid) " +
                "                   VALUES (" + weid + ", '" + fromUser + "', '" + jysj + "', '" + jylx + "', " + czqjf + ", " + kczjf + ", null, " + syjf + ", '" + syjh + "', '" + yhmc + "', null, '" + dealId + "', '" + bmbh + "', null, null, null,    null,     null,  null,      '0',  " + uid + ")|";
    }*/
}
